﻿<Button x:Name="Button" x:Class="Daytimer.Controls.AppointmentNavButton"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="178" Width="24"
		VerticalAlignment="Center" Foreground="{DynamicResource AppointmentNavForeground}" Loaded="Button_Loaded"
		Focusable="False" IsHitTestVisible="{Binding IsEnabled, RelativeSource={RelativeSource Self}}">
	<Button.Template>
		<ControlTemplate TargetType="Button">
			<Grid x:Name="OuterBorder" Background="{DynamicResource White}">
				<Border x:Name="Border" Background="{DynamicResource ButtonMouseOverBackground}" BorderThickness="1"
						BorderBrush="{DynamicResource ButtonMouseOverBorder}" IsHitTestVisible="False" />
				<ContentPresenter />
				<VisualStateManager.VisualStateGroups>
					<VisualStateGroup x:Name="CommonStates">
						<VisualState x:Name="Normal">
							<Storyboard FillBehavior="Stop">
								<DoubleAnimation Storyboard.TargetName="Border"
										Storyboard.TargetProperty="Background.Opacity" To="1" Duration="0:0:0.3" />
							</Storyboard>
						</VisualState>
						<VisualState x:Name="MouseOver">
							<Storyboard>
								<DoubleAnimation Storyboard.TargetName="Border"
										Storyboard.TargetProperty="Background.Opacity" To="0.2" Duration="0:0:0.3" />
							</Storyboard>
						</VisualState>
						<VisualState x:Name="Disabled">
							<Storyboard>
								<DoubleAnimation x:Name="fadeOutAnim" Storyboard.TargetName="OuterBorder"
										Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:1.2"
										BeginTime="0:0:0.2" />
							</Storyboard>
						</VisualState>
					</VisualStateGroup>
				</VisualStateManager.VisualStateGroups>
			</Grid>
		</ControlTemplate>
	</Button.Template>
	<Grid>
		<Image x:Name="img" Source="pack://application:,,,/Daytimer.Images;component/Images/appointmentnav.png"
				Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,11,0,0"
				RenderTransformOrigin="0.5,0.5" />
		<TextBlock x:Name="textDisplay" Text="Next Appointment" HorizontalAlignment="Center" VerticalAlignment="Center"
				RenderTransformOrigin="0.5,0.5">
			<TextBlock.LayoutTransform>
				<RotateTransform Angle="-90" />
			</TextBlock.LayoutTransform></TextBlock>
	</Grid>
</Button>
